<!DOCTYPE html>
<html class="has-topbar has-bottombar">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
		<link rel="shortcut icon" href="../../img/icon/bitbug_favicon.ico">
		<link rel="stylesheet" href="../../css/mui/mui.min.css" />
		<link rel="stylesheet" href="../../css/myAlert.css" />
		<title>修改提现密码</title>
		<style>
			html,
			body {
				background: #fbfbfb !important;
			}
			
			ul,
			li {
				list-style: none;
			}
			
			.mui_aetd {
				width: 100%;
				height: 50px;
				background: #FBFBFB;
				position: fixed;
				top: 0px;
				z-index: 888;
				border-bottom: solid 1px #EEEEEE;
			}
			
			.aeta_b {
				width: 100%;
				height: 100%;
				float: left;
			}
			
			.aeta_b img {
				width: 10px;
				height: 15px;
				display: block;
				margin-top: 0.44rem;
				float: left;
				margin-top: 17.5px;
			}
			
			.qy_detas {
				text-align: center;
				color: #1B1B1B;
				font-size: 1.2rem;
				line-height: 50px
			}
			
			input::-webkit-input-placeholder {
				color: #939393
			}
			
			input:-moz-placeholder {
				color: #939393;
			}
			
			input:-ms-input-placeholder {
				color: #939393;
			}
			
			.pws_usda {
				width: 90%;
				height: 115px;
				background: ;
				margin: 0 auto;
				margin-top: 70px;
			}
			
			.usda_iph {
				width: 100%;
				height: 50px;
				line-height: 50px;
				color: #666666;
			}
			
			.usda_iph span {
				color: #1B1B1B;
			}
			
			.usda_code {
				width: 100%;
				height: 50px;
				border-bottom: #CCCCCC solid 1px;
				margin-top: 10px;
			}
			
			.usda_code .ipj_right {
				width: 40%;
				height: 25px;
				float: left;
				margin-top: 11px;
			}
			
			.usda_code .ipj_right input {
				width: 100%;
				height: 25px;
				line-height: 25px;
				border: 0px;
				padding: 0px;
				font-size: 1.1rem;
				background: #FBFBFB;
			}
			
			.usda_code .ipj_right2 {
				float: right;
			}
			
			.usda_code .ipj_right2 button {
				margin-top: 11px;
				width: auto;
				height: 25px;
				line-height: 0px;
				font-size: 1.1rem;
				color: #3CAFFF;
				float: right;
				border: 0px;
				background: #FBFBFB;
			}
			
			.upda_sub {
				width: 90%;
				height: 50px;
				background: #3CAFFF;
				color: #FFFFFF;
				font-size: 1.2rem;
				text-align: center;
				line-height: 50px;
				margin: 0 auto;
				border-radius: 8px;
				margin-top: 50%;
			}
			
			@media screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) {
				.qy_detas {
					text-align: center;
					color: #1B1B1B;
					font-size: 0.9rem;
					line-height: 50px
				}
				.usda_iph .ipj_right input {
					width: 100%;
					height: 25px;
					line-height: 25px;
					margin-left: 10px;
					border: 0px;
					padding: 0px;
					font-size: 0.9rem;
				}
				.usda_code .ipj_right {
					width: 40%;
					height: 25px;
					float: left;
					margin-top: 11px;
				}
				.usda_code .ipj_right input {
					width: 100%;
					height: 25px;
					line-height: 25px;
					border: 0px;
					padding: 0px;
					font-size: 0.9rem;
				}
				.usda_code .ipj_right2 {
					float: right;
					margin-right: 10px;
				}
				.usda_code .ipj_right2 button {
					padding: 0px;
					width: auto;
					height: 25px;
					line-height: 0px;
					font-size: 0.9rem;
					color: #3CAFFF;
					float: right;
					border: 0px;
				}
			}
		</style>
	</head>

	<body>
		<div class="mui_aetd" id="mui_aetd">
			<div class="aeta_b">
				<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #6D6D72;margin-left: 2%;font-size: 1.5rem;line-height: 3rem;"></a>
				<div class="qy_detas">修改提现密码</div>
			</div>
		</div>

		<div class="pws_usda">
			<div class="usda_iph">
				短信验证码发送至：<span id="phone"></span>
			</div>
			<div class="usda_code">
				<div class="ipj_right">
					<input type="text" id="get_code" maxlength="6" placeholder="请输入验证码">
				</div>
				<div class="ipj_right2">
					<button id="code_btn">获取验证码</button>
				</div>
			</div>
		</div>
		<div id="mate_btn" class="upda_sub">确定</div>

		<div style="position: fixed;display:table;margin: 0 auto;width: 0px;height: 0px;;top: 45%;left: 50%;right: 50%;z-index: 1000;">
			<div id="myspin" style="position: fixed;z-index: 10000;"></div>
		</div>
	</body>
	<script type="text/javascript" src="../../js/mui/mui.min.js"></script>
	<script type="text/javascript" src="../../js/jquery/jquery-2.1.4.min.js"></script>
	<script type="text/javascript" src="../../js/myAlert.js"></script>
	<script type="text/javascript" src="../../js/spin/spin.min.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript" src="../server.js"></script>

	<script>
		if(isiOS) {
			$(".mui_aetd").css("display", "none");
			$(".pws_usda").css("margin-top", "20px");
		}

		var spinner = new Spinner(opts);
		var token = "";

		$("#phone").html(sessionStorage.getItem("reg_phone"));

		//获取验证码
		$("#code_btn").click(function() {
			var phoneNum = $("#phone").html(); //手机号
			var param = {};
			param.phone = phoneNum;
			param.type = 5;
			//获取验证码接口上送
			gainCode(param, function(data) {
				token = data;
				//开启验证码定时器
				for(i = 1; i <= 60; i++) {
					if(i == 1) {
						window.setTimeout("countDown(" + i + ")");
					} else {
						window.setTimeout("countDown(" + i + ")", (i - 1) * 1000);
					}
				}
			});
		})

		//验证码确定
		$("#mate_btn").click(function() {
			var code = $("#get_code").val(); //验证码
			var phoneNum = $("#phone").html(); //手机号
			var flag = checkCode(code);
			if(flag) {
				//校验验证码接口上送
				var param = {};
				param.phone = phoneNum;
				param.type = 5;
				param.code = code;
				param.token = token;
				mateCode(param, function(data) {
					spinner.spin();
					//验证成功后把禁用的input去除,恢复可输入状态
					mui.toast("短信验证成功");
					setTimeout(function() {
						window.location.href = "withdrawpwd_upok.html";
					}, 1500);
				})
			}
		})
	</script>

</html>